package edu.sctu.liangyuxiang.day20150521;
import java.util.Arrays;

/**
 * Created by user20 on 2015/5/21.
 */
public class TextOne extends TextMore {

    Student[] studentcode1 = new Student[teacher[0].student.length];

    public TextOne(Teacher[] teacher) {
        super(teacher);
    }

    public void getTeacherInfo(){
        sotrNumber();
        System.out.println(teacher[0].number +":"+ teacher[1].number);
    }

    public Student[] getStudent(int code,Student[] student){
        Student[] studentcode = new Student[studentcode1.length];

        for (int i = 0; i < studentcode1.length; i++) {
            if(student[i].code > code){
                studentcode[i] = student[i];
            }
        }
        return studentcode;
    }

    IterfaceStudent aninterface = new IterfaceStudent() {
        @Override
        public Student[] aninterface(Student[] student) {
            Student[] studentnumber = getStudent(60,student);

            return studentnumber;
        }
    };

    public Student[] getCode(){
        Teacher teacher = pritCoded();
        Student[] studentnumber1 = aninterface.aninterface(teacher.student);

        return studentnumber1;
    }

    public void getCourse(){
        TextData textData = new TextData();
        System.out.println(textData.setStudentCourse()[0].course[0].course);
    }
}
